<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
<script>

    let method1=async()=>{
        // return 1;
        return Promise.reject("失败")
    }

    let method2=async()=>{
            try {
                
        let res = await method1();
        console.log(res);
        
            } catch (error) {
                console.log("被捕获了！");
                
            }

    }


    method2();




</script>

</head>
<body>
    
</body>
</html>